/*
 * Copyright 2024 NXP
 * SPDX-License-Identifier: MIT
 */

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"



void setup_scr_mian1(lv_ui *ui){

	//Write codes mian1
	ui->mian1 = lv_obj_create(NULL);

	//Write style state: LV_STATE_DEFAULT for style_mian1_main_main_default
	static lv_style_t style_mian1_main_main_default;
	lv_style_reset(&style_mian1_main_main_default);
	lv_style_set_bg_color(&style_mian1_main_main_default, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_bg_opa(&style_mian1_main_main_default, 0);
	lv_obj_add_style(ui->mian1, &style_mian1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes mian1_img_1
	ui->mian1_img_1 = lv_img_create(ui->mian1);
	lv_obj_set_pos(ui->mian1_img_1, 221, 0);
	lv_obj_set_size(ui->mian1_img_1, 18, 18);

	//Write style state: LV_STATE_DEFAULT for style_mian1_img_1_main_main_default
	static lv_style_t style_mian1_img_1_main_main_default;
	lv_style_reset(&style_mian1_img_1_main_main_default);
	lv_style_set_img_recolor(&style_mian1_img_1_main_main_default, lv_color_make(0xff, 0xff, 0xff));
	lv_style_set_img_recolor_opa(&style_mian1_img_1_main_main_default, 0);
	lv_style_set_img_opa(&style_mian1_img_1_main_main_default, 255);
	lv_obj_add_style(ui->mian1_img_1, &style_mian1_img_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_add_flag(ui->mian1_img_1, LV_OBJ_FLAG_CLICKABLE);
	lv_img_set_src(ui->mian1_img_1,&_f_18x18);
	lv_img_set_pivot(ui->mian1_img_1, 0,0);
	lv_img_set_angle(ui->mian1_img_1, 0);

	//Write codes mian1_Electricity
	ui->mian1_Electricity = lv_label_create(ui->mian1);
	lv_obj_set_pos(ui->mian1_Electricity, 206, 5);
	lv_obj_set_size(ui->mian1_Electricity, 15, 10);
	lv_label_set_text(ui->mian1_Electricity, "15%");
	lv_label_set_long_mode(ui->mian1_Electricity, LV_LABEL_LONG_WRAP);
	lv_obj_set_style_text_align(ui->mian1_Electricity, LV_TEXT_ALIGN_LEFT, 0);

	//Write style state: LV_STATE_DEFAULT for style_mian1_electricity_main_main_default
	static lv_style_t style_mian1_electricity_main_main_default;
	lv_style_reset(&style_mian1_electricity_main_main_default);
	lv_style_set_radius(&style_mian1_electricity_main_main_default, 0);
	lv_style_set_bg_color(&style_mian1_electricity_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_mian1_electricity_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_mian1_electricity_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_mian1_electricity_main_main_default, 0);
	lv_style_set_text_color(&style_mian1_electricity_main_main_default, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_mian1_electricity_main_main_default, &lv_font_montserratMedium_7);
	lv_style_set_text_letter_space(&style_mian1_electricity_main_main_default, 0);
	lv_style_set_pad_left(&style_mian1_electricity_main_main_default, 0);
	lv_style_set_pad_right(&style_mian1_electricity_main_main_default, 0);
	lv_style_set_pad_top(&style_mian1_electricity_main_main_default, 0);
	lv_style_set_pad_bottom(&style_mian1_electricity_main_main_default, 0);
	lv_obj_add_style(ui->mian1_Electricity, &style_mian1_electricity_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes mian1_date
	ui->mian1_date = lv_label_create(ui->mian1);
	lv_obj_set_pos(ui->mian1_date, 26, 5);
	lv_obj_set_size(ui->mian1_date, 44, 10);
	lv_label_set_text(ui->mian1_date, "2024/04/11");
	lv_label_set_long_mode(ui->mian1_date, LV_LABEL_LONG_WRAP);
	lv_obj_set_style_text_align(ui->mian1_date, LV_TEXT_ALIGN_LEFT, 0);

	//Write style state: LV_STATE_DEFAULT for style_mian1_date_main_main_default
	static lv_style_t style_mian1_date_main_main_default;
	lv_style_reset(&style_mian1_date_main_main_default);
	lv_style_set_radius(&style_mian1_date_main_main_default, 0);
	lv_style_set_bg_color(&style_mian1_date_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_mian1_date_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_mian1_date_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_mian1_date_main_main_default, 0);
	lv_style_set_text_color(&style_mian1_date_main_main_default, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_mian1_date_main_main_default, &lv_font_montserratMedium_7);
	lv_style_set_text_letter_space(&style_mian1_date_main_main_default, 0);
	lv_style_set_pad_left(&style_mian1_date_main_main_default, 0);
	lv_style_set_pad_right(&style_mian1_date_main_main_default, 0);
	lv_style_set_pad_top(&style_mian1_date_main_main_default, 0);
	lv_style_set_pad_bottom(&style_mian1_date_main_main_default, 0);
	lv_obj_add_style(ui->mian1_date, &style_mian1_date_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes mian1_label_1
	ui->mian1_label_1 = lv_label_create(ui->mian1);
	lv_obj_set_pos(ui->mian1_label_1, 70, 5);
	lv_obj_set_size(ui->mian1_label_1, 30, 10);
	lv_label_set_text(ui->mian1_label_1, "11:10");
	lv_label_set_long_mode(ui->mian1_label_1, LV_LABEL_LONG_WRAP);
	lv_obj_set_style_text_align(ui->mian1_label_1, LV_TEXT_ALIGN_LEFT, 0);

	//Write style state: LV_STATE_DEFAULT for style_mian1_label_1_main_main_default
	static lv_style_t style_mian1_label_1_main_main_default;
	lv_style_reset(&style_mian1_label_1_main_main_default);
	lv_style_set_radius(&style_mian1_label_1_main_main_default, 0);
	lv_style_set_bg_color(&style_mian1_label_1_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_mian1_label_1_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_mian1_label_1_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_mian1_label_1_main_main_default, 0);
	lv_style_set_text_color(&style_mian1_label_1_main_main_default, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_mian1_label_1_main_main_default, &lv_font_montserratMedium_7);
	lv_style_set_text_letter_space(&style_mian1_label_1_main_main_default, 2);
	lv_style_set_pad_left(&style_mian1_label_1_main_main_default, 0);
	lv_style_set_pad_right(&style_mian1_label_1_main_main_default, 0);
	lv_style_set_pad_top(&style_mian1_label_1_main_main_default, 0);
	lv_style_set_pad_bottom(&style_mian1_label_1_main_main_default, 0);
	lv_obj_add_style(ui->mian1_label_1, &style_mian1_label_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes mian1_label_3
	ui->mian1_label_3 = lv_label_create(ui->mian1);
	lv_obj_set_pos(ui->mian1_label_3, 70, 57);
	lv_obj_set_size(ui->mian1_label_3, 100, 27);
	lv_label_set_text(ui->mian1_label_3, "2");
	lv_label_set_long_mode(ui->mian1_label_3, LV_LABEL_LONG_WRAP);
	lv_obj_set_style_text_align(ui->mian1_label_3, LV_TEXT_ALIGN_CENTER, 0);

	//Write style state: LV_STATE_DEFAULT for style_mian1_label_3_main_main_default
	static lv_style_t style_mian1_label_3_main_main_default;
	lv_style_reset(&style_mian1_label_3_main_main_default);
	lv_style_set_radius(&style_mian1_label_3_main_main_default, 0);
	lv_style_set_bg_color(&style_mian1_label_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_mian1_label_3_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_mian1_label_3_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_mian1_label_3_main_main_default, 255);
	lv_style_set_text_color(&style_mian1_label_3_main_main_default, lv_color_make(0x00, 0x00, 0x00));
	lv_style_set_text_font(&style_mian1_label_3_main_main_default, &lv_font_montserratMedium_12);
	lv_style_set_text_letter_space(&style_mian1_label_3_main_main_default, 2);
	lv_style_set_pad_left(&style_mian1_label_3_main_main_default, 0);
	lv_style_set_pad_right(&style_mian1_label_3_main_main_default, 0);
	lv_style_set_pad_top(&style_mian1_label_3_main_main_default, 0);
	lv_style_set_pad_bottom(&style_mian1_label_3_main_main_default, 0);
	lv_obj_add_style(ui->mian1_label_3, &style_mian1_label_3_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes mian1_btn_2
	ui->mian1_btn_2 = lv_btn_create(ui->mian1);
	lv_obj_set_pos(ui->mian1_btn_2, 140, 85);
	lv_obj_set_size(ui->mian1_btn_2, 100, 50);

	//Write style state: LV_STATE_DEFAULT for style_mian1_btn_2_main_main_default
	static lv_style_t style_mian1_btn_2_main_main_default;
	lv_style_reset(&style_mian1_btn_2_main_main_default);
	lv_style_set_radius(&style_mian1_btn_2_main_main_default, 5);
	lv_style_set_bg_color(&style_mian1_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_color(&style_mian1_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_bg_grad_dir(&style_mian1_btn_2_main_main_default, LV_GRAD_DIR_VER);
	lv_style_set_bg_opa(&style_mian1_btn_2_main_main_default, 255);
	lv_style_set_shadow_color(&style_mian1_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_shadow_opa(&style_mian1_btn_2_main_main_default, 255);
	lv_style_set_border_color(&style_mian1_btn_2_main_main_default, lv_color_make(0x21, 0x95, 0xf6));
	lv_style_set_border_width(&style_mian1_btn_2_main_main_default, 0);
	lv_style_set_border_opa(&style_mian1_btn_2_main_main_default, 255);
	lv_obj_add_style(ui->mian1_btn_2, &style_mian1_btn_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
	ui->mian1_btn_2_label = lv_label_create(ui->mian1_btn_2);
	lv_label_set_text(ui->mian1_btn_2_label, "default");
	lv_obj_set_style_text_color(ui->mian1_btn_2_label, lv_color_make(0x00, 0x00, 0x00), LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->mian1_btn_2_label, &lv_font_simsun_12, LV_STATE_DEFAULT);
	lv_obj_set_style_pad_all(ui->mian1_btn_2, 0, LV_STATE_DEFAULT);
	lv_obj_align(ui->mian1_btn_2_label, LV_ALIGN_CENTER, 0, 0);

	//Init events for screen
	events_init_mian1(ui);
}